#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int min = 0;
	int n;
	int arr[10000];
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &arr[i]);
	}
	for (int i = 0; i < n; i++)
	{
		if (min > arr[i])
			min = arr[i];
	}
	printf("%d", min);
	return 0;
}